﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace MvcWiki.Web.Prototype.MVC2P1.Wiki
{
    public static class Routes
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.MapAreaRoute(
                "MvcWiki.Web.Prototype.MVC2P1.Wiki",
                "Wiki_Namespace",
                "wiki/namespace/{action}/{namespace}",
                new { controller = "wikinamespace", action = "", @namespace = "" },
                new string[] { "MvcWiki.Web.Prototype.MVC2P1.Wiki.Controllers" }
            );

            routes.MapAreaRoute(
                "MvcWiki.Web.Prototype.MVC2P1.Wiki",
                "Wiki_Page",
                "wiki/page/{action}/{namespace}/{page}/{revision}",
                new { controller = "wikipage", action = "", @namespace = "", page = "", revision = "" },
                new string[] { "MvcWiki.Web.Prototype.MVC2P1.Wiki.Controllers" }
            );

            routes.MapAreaRoute(
                "MvcWiki.Web.Prototype.MVC2P1.Wiki",
                "Wiki_Default",
                "wiki/{controller}/{action}/{id}",
                new { controller = "wiki", action = "index", id = "" },
                new string[] { "MvcWiki.Web.Prototype.MVC2P1.Wiki.Controllers" }
            );
        }
    }
}
